import{d as g,k as c,p as h,P as f,I as v,O as x,q as V,bH as k,b as y,o as _}from"./DrFvzlh8agutd.js";const w=g({__name:"app-input-text",props:{modelValue:{}},emits:["update:modelValue","change","action"],setup(d,{emit:r}){const i=d,o=r,s=c(),p=h("app-input-text",globalThis.debugUI??!1),t=c(i.modelValue??"");function m(){o("update:modelValue",t.value),o("change",t.value),o("action",t.value)}function u(){const e=s.value;if(p("resize",e),e){const n=window.getComputedStyle(e),a=Number.parseInt(n.minHeight,10);e.style.paddingBlockEnd="",e.style.height="1px";let l=e.scrollHeight;l=l>a||a<1?l+3:a,e.style.height=`${l}px`}}return f(s,"input",u),v(u),x(()=>i.modelValue,e=>{p("did change value",e),t.value=e??"",queueMicrotask(u)}),(e,n)=>V((_(),y("textarea",{ref_key:"input",ref:s,"onUpdate:modelValue":n[0]||(n[0]=a=>t.value=a),class:"app-input-text",onBlur:m},null,544)),[[k,t.value]])}});export{w as _};